package com.seventh.parkingrent.Util;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Base64;

public class EncryptUtils {


    public static String encrypt(String raw) throws NoSuchAlgorithmException {
        MessageDigest md5 = MessageDigest.getInstance("MD5");
        byte[] digest = md5.digest(raw.getBytes());
        return Base64.getEncoder().encodeToString(digest);
    }

}
